package com.ruoyi.system.service;

import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.List;
import com.ruoyi.system.domain.ProjectInfo;
import com.ruoyi.system.domain.summary.AnnualMetrics;
import com.ruoyi.system.domain.summary.ProjectSummary;
import com.ruoyi.system.domain.summary.Summary;

/**
 * 项目Service接口
 * 
 * @author xuliang
 * @date 2024-03-29
 */
public interface IProjectInfoService 
{
    /**
     * 查询项目
     * 
     * @param id 项目主键
     * @return 项目
     */
    public ProjectInfo selectProjectInfoById(Long id);

    /**
     * 查询项目列表
     * 
     * @param projectInfo 项目
     * @return 项目集合
     */
    public List<ProjectInfo> selectProjectInfoList(ProjectInfo projectInfo);

    /**
     * 新增项目
     * 
     * @param projectInfo 项目
     * @return 结果
     */
    public int insertProjectInfo(ProjectInfo projectInfo);

    /**
     * 修改项目
     * 
     * @param projectInfo 项目
     * @return 结果
     */
    public int updateProjectInfo(ProjectInfo projectInfo);

    /**
     * 批量删除项目
     * 
     * @param ids 需要删除的项目主键集合
     * @return 结果
     */
    public List<Long> deleteProjectInfoByIds(Long[] ids);

    public int checkProjectBeforeDelete(long id);

    /**
     * 删除项目信息
     * 
     * @param id 项目主键
     * @return 结果
     */
    public int deleteProjectInfoById(Long id);

    // 查询时更新项目
    public void updateProjectInfoBeforeGet(String projectName, String projectCode);

    // 确认数量
    public int checkProjectByNameAndCode(String projectName,String projectCode);

    public ProjectInfo selectProjectInfo(ProjectInfo projectInfo);

    int updateItemSummary(String projectCode,boolean insert);

    int updateLaborSummary(String projectCode,boolean insert);

    int updateDirectSummary(String projectCode,boolean insert);

    Summary selectItemSummary(String projectCode);

    Summary selectLaborSummary(String projectCode);

    Summary selectDirectSummary(String projectCode);

    int insertItemSummary(String projectCode);

    int insertLaborSummary(String projectCode);

    int insertDirectSummary(String projectCode);

    public List<String> getProjectCodes(Integer areaId);

    public List<String> getContractByAreaId(Integer areaId);

    public List<String> getContractNameByAreaId(Integer areaId);

    int updateIndirectSummary(String projectCode,boolean insert);

    Summary selectIndirectSummary(String projectCode);

    int insertIndirectSummary(String projectCode);

    int insertProjectSummary(ProjectSummary projectSummary);

    int updateProjectSummary();

    int updateProjectSummaryByEntity(ProjectSummary projectSummary);

    List<ProjectSummary> selectProjectSummaryList(Integer areaId);

    int checkProjectSummary(String projectCode);

    Integer selectMaxNumber(String projectCode);

    LocalDateTime selectMaxTimeByProjectCodeAndNumber(String projectCode,Integer number);

    int updateProjectNumber(String DateNumber,String projectCode);

    String getProjectCodeByName(String projectName);

    BigDecimal getProjectContractByName(String projectName);

    int checkContractByNameAndCode(String projectName,String projectCode);

    boolean checkRoleByUserId(long userId, List<Long> roleIds);

    List<Long> getRoleIdsByUserId(long userId);

    long getNewestUserId();

    int insertProjectUser(String projectCode, long userId);

    String getProjectNameByCode(String projectCode);

    String getProjectCodeByUserId(long userId);

    int insertAnnualMetrics(Integer areaId,String dateNumber);

    void updateAnnualMetrics();

    List<AnnualMetrics> getAnnualMetricsList(String dateNumber);

}
